This document shows changes in the DSM habitat inputs from the old habitat data to new 2021 DSMhabitat release. Each section shows new, old and scaled habitat estimates, describes change and percent change in mean habitat, and explains what caused the habitat change for each river in which habitat acres shifted.
# Fall Run Scales
# SPAWN
# 1 Upper Sac
# 2 Butte
# 3 Clear
# 4 Deer
# 5 Mill
# 6 Feather
# 7 Yuba
# 8 American
# 9 Cosumness
# 10 Mokelumne
# 11 Merced
# 12 Stanislaus
# 13 Tuolumne
# REAR
# 1 Upper Sac
# 2 Butte
# 3 Clear
# 4 Deer
# 5 Mill
# 6 Upper-mid Sac (corridor for above)
# 7 Sutter (corridor for above) is changed below
# 8 Feather
# 9 Yuba
# 10 Lower-mid Sac (corridor for above)
# 11 Yolo (corridor for above) is changed below
# 12 American
# 13 Lower Sac (corridor for above)
# 14 Cosumness
# 15 Mokelumne
# 16 Merced
# 17 Stanislaus
# 18 Tuolumne
# 19 SJ (corridor for Merced, Stan, and Tuolumne)
# here 1-13 are spawning scalars
# 14-n are the rearing scalars
fall_run_scales <- c(1.8615848, 0.5000000,
0.5000000, 1.4230370,
0.5887938, 2.0000000,
0.5034449, 0.5502821,
1.6139332, 0.9551340,
1.6993421, 0.9627230,
0.9959632, 0.5000000,
1.8237525, 2.0000000,
1.9999999, 2.0000000,
2.0000000, 0.9783833,
1.5406860, 0.6596480,
1.9999994, 1.9999994,
0.5000423, 0.6147676,
0.6598354, 0.8103934,
1.2434156, 1.4492968,
0.9347787, 1.6509423,
0.5000000, 1.9800862)
spawn_scales <- tibble(watershed = factor(DSMscenario::watershed_labels[c(1, 6, 7, 10, 12, 19, 20,
23, 26, 27, 28, 29, 30)],
levels = DSMscenario::watershed_labels),
scales = fall_run_scales[1:13])
rear_scales <- tibble(watershed = factor(c(DSMscenario::watershed_labels[c(1, 6, 7, 10, 12, 16,
19, 20, 21, 23, 24,
26, 27, 28, 29, 30, 31, 17, 22)], "North Delta", "South Delta"),
levels = DSMscenario::watershed_labels),
scales = fall_run_scales[14:34])
new <- DSMhabitat::fr_fry %>% DSMhabitat::square_meters_to_acres()
old <- cvpiaData::fr_fry %>% DSMhabitat::square_meters_to_acres()
dimnames(old) <- dimnames(new)
fry <- expand_grid(
watershed = factor(DSMscenario::watershed_labels,
levels = DSMscenario::watershed_labels),
month = 1:12,
year = 1980:2000) %>%
left_join(rear_scales) %>%
arrange(year, month, watershed) %>%
mutate(
old = as.vector(old),
new = as.vector(new),
scaled = old * scales
)
fry %>%
transmute(watershed, date = ymd(paste(year, month, 1)), old, new, scaled) %>%
filter(!(watershed %in% c('Sutter Bypass', 'Yolo Bypass'))) %>%
gather(version, acres, -watershed, -date) %>%
ggplot(aes(date, acres, color = version)) +
geom_line() +
facet_wrap(~watershed, scales = 'free_y')
Summary Table: All habitat measures are in acres and rounded to the nearest acre.
change <- fry %>% group_by(watershed) %>%
summarise(mean_old_habitat = round(mean(old)),
mean_new_habitat = round(mean(new)),
change_in_mean_habitat = round(mean_new_habitat - mean_old_habitat),
percent_change = round(change_in_mean_habitat/mean_old_habitat * 100),
percent_change_in_mean_habitat = paste(percent_change, "%")
) %>%
filter(change_in_mean_habitat != 0, watershed != "Merced River") %>%
select(-percent_change)
DT::datatable(change, option=list(columnDefs=list(list(targets=3:5, class="dt-right"))))
IFIMWUA.xlsx. Data was updated to 'data-raw/watershed/bear_river/data/updated_bear_river_instream.csv' also provided by Mark Gard.IFIMWUA.xlsx. Data was updated to "data-raw/watershed/calaveras/data/calaveras.csv"IFIMWUA.xlsx (I4:N60) which was not scaled by reach length. We updated the data to scale in each reach depending on length by reading in each reach separately, scale habitat in each reach according to reach length, and then adding all reaches together.new <- DSMhabitat::fr_juv %>% DSMhabitat::square_meters_to_acres()
old <- cvpiaData::fr_juv %>% DSMhabitat::square_meters_to_acres()
dimnames(old) <- dimnames(new)
juv <- expand_grid(
watershed = factor(DSMscenario::watershed_labels,
levels = DSMscenario::watershed_labels),
month = 1:12,
year = 1980:2000) %>%
left_join(rear_scales) %>%
arrange(year, month, watershed) %>%
mutate(
old = as.vector(old),
new = as.vector(new),
scaled = old * scales)
juv %>%
transmute(watershed, date = ymd(paste(year, month, 1)), old, new, scaled) %>%
filter(!(watershed %in% c('Sutter Bypass', 'Yolo Bypass'))) %>%
gather(version, acres, -watershed, -date) %>%
ggplot(aes(date, acres, color = version)) +
geom_line() +
facet_wrap(~watershed, scales = 'free_y')
Summary Table: All habitat measures are in acres and rounded to the nearest acre.
change <- juv %>% group_by(watershed) %>%
summarise(mean_old_habitat = round(mean(old)),
mean_new_habitat = round(mean(new)),
change_in_mean_habitat = round(mean_new_habitat - mean_old_habitat),
percent_change = round(change_in_mean_habitat/mean_old_habitat * 100),
percent_change_in_mean_habitat = paste(percent_change, "%")
) %>%
filter(change_in_mean_habitat != 0, watershed != "Merced River") %>%
select(-percent_change)
DT::datatable(change, option=list(columnDefs=list(list(targets=3:5, class="dt-right"))))
IFIMWUA.xlsx. Data was updated to 'data-raw/watershed/bear_river/data/updated_bear_river_instream.csv' also provided by Mark Gard.IFIMWUA.xlsx. Data was updated to "data-raw/watershed/calaveras/data/calaveras.csv"IFIMWUA.xlsx (I4:N60) which was not scaled by reach length. We updated the data to scale in each reach depending on length by reading in each reach separately, scale habitat in each reach according to reach length, and then adding all reaches together.new <- DSMhabitat::fr_spawn %>% DSMhabitat::square_meters_to_acres()
old <- cvpiaData::fr_spawn %>% DSMhabitat::square_meters_to_acres()
spawn <- expand_grid(
watershed = factor(DSMscenario::watershed_labels,
levels = DSMscenario::watershed_labels),
month = 1:12,
year = 1979:2000) %>%
left_join(spawn_scales) %>%
arrange(year, month, watershed) %>%
mutate(
old = as.vector(old),
new = as.vector(new),
scaled = old * scales)
spawn %>%
transmute(watershed, date = ymd(paste(year, month, 1)), old, new, scaled) %>%
filter(!(watershed %in% c('Sutter Bypass', 'Yolo Bypass'))) %>%
gather(version, acres, -watershed, -date) %>%
ggplot(aes(date, acres, color = version)) +
geom_line() +
facet_wrap(~watershed, scales = 'free_y')
Summary Table: All habitat measures are in acres and rounded to the nearest acre.
change <- spawn %>% group_by(watershed) %>%
summarise(mean_old_habitat = round(mean(old)),
mean_new_habitat = round(mean(new)),
change_in_mean_habitat = round(mean_new_habitat - mean_old_habitat),
percent_change = round(change_in_mean_habitat/mean_old_habitat * 100),
percent_change_in_mean_habitat = paste(percent_change, "%")
) %>%
filter(change_in_mean_habitat != 0) %>%
select(-percent_change)
DT::datatable(change, option=list(columnDefs=list(list(targets=3:5, class="dt-right"))))
IFIMWUA.xlsx. Data was updated to 'data-raw/watershed/bear_river/data/updated_bear_river_instream.csv' also provided by Mark Gard.IFIMWUA.xlsx. Data was updated to "data-raw/watershed/data/butte_creek_spring_run_spawning_wua.csv'" & "data-raw/watershed/data/butte_creek_steelhead_spawning_wua.csv'" (Went to the origional report and got additional information)IFIMWUA.xlsx. Data was updated to "data-raw/watershed/calaveras/data/calaveras.csv"IFIMWUA.xlsx (A18:E48) but this original data did not have consistent flows across all 3 reaches. Updated data reads in each reach separately and uses an approx function to find habitat for each flow at each reach and then combines all reaches at corresponding flows.IFIMWUA.xlsx (I4:N60) which was not scaled by reach length. We updated the data to scale in each reach depending on length by reading in each reach separately, scale habitat in each reach according to reach length, and then adding all reaches together.new <- DSMhabitat::fr_fp %>% DSMhabitat::square_meters_to_acres()
old <- cvpiaData::fr_fp %>% DSMhabitat::square_meters_to_acres()
dimnames(old) <- dimnames(new)
fp <- expand_grid(
watershed = factor(DSMscenario::watershed_labels,
levels = DSMscenario::watershed_labels),
month = 1:12,
year = 1980:2000) %>%
arrange(year, month, watershed) %>%
mutate(
old = as.vector(old),
new = as.vector(new))
fp %>%
transmute(watershed, date = ymd(paste(year, month, 1)), old, new) %>%
filter(!(watershed %in% c('Sutter Bypass', 'Yolo Bypass'))) %>%
gather(version, acres, -watershed, -date) %>%
ggplot(aes(date, acres, fill = version)) +
geom_col(position = 'dodge') +
facet_wrap(~watershed, scales = 'free_y')
Summary Table: All habitat measures are in acres and rounded to the nearest acre.
change <- fp %>% group_by(watershed) %>%
summarise(mean_old_habitat = round(mean(old)),
mean_new_habitat = round(mean(new)),
change_in_mean_habitat = round(mean_new_habitat - mean_old_habitat),
percent_change = round(change_in_mean_habitat/mean_old_habitat * 100),
percent_change_in_mean_habitat = paste(percent_change, "%")
) %>%
filter(change_in_mean_habitat != 0) %>%
select(-percent_change)
DT::datatable(change, option=list(columnDefs=list(list(targets=3:5, class="dt-right"))))